
import React from 'react';
import { IMessageItem } from './type';
import { IDesItem } from '@/types';
export function MessagePresets(props: { presets: IDesItem[]; isH5?: boolean; onSelectPreset: (preset:IDesItem) => void;onRefreshPresets:()=>void}) { 
    return (
        <div className="presetsArea">
            <b>或可以尝试推荐的示范案例</b>
            <div className="rightPresets">
                {props.presets.map((item, index) => { 
                    return <span onClick={() => { 
                        props.onSelectPreset(item)
                    }} key={item.title}>{item.title}</span>
                })}
                <i className='iconfont icon-zhongxinjiazai' onClick={props.onRefreshPresets}></i>
            </div>
        </div>
    )
}